import View, { open, view } from "../utils/ui";
import { Loading } from "./loading";
import { GameView } from "./main";
// logo
@view('Logo/Main')
export default class Logo extends View {
    attach() {
        var effect: fgui.Transition = this.view.getTransition('t0');
        effect.play(Laya.Handler.create(this, this.playComplet))
    }

    playComplet() {
        // 加载组件
        this.dispose();
        let loading = new Loading();
        loading.download({
            sourceList: [
                'res/ai/EnemyNodes.json',
                'res/ai/openDoor.json'
            ],
            packageList: ['Components', 'Main']
        }).then(() => {
            loading.dispose();
            new GameView()
        });
    }
}